package br.com.sgc.entities.geral;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(schema="geral")
@Inheritance(strategy = InheritanceType.JOINED)
public class Tratamento implements Serializable{

	private static final long serialVersionUID = 7362134524020228212L;
	
	@Id
	@SequenceGenerator(sequenceName="geral.seq_tratamento", name="SEQ", allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE,  generator="SEQ")
	private Long id;
	
	private String tratamento;
	
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name="clinica_id")
	private Clinica clinica = new Clinica();
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTratamento() {
		return tratamento;
	}

	public void setTratamento(String tratamento) {
		this.tratamento = tratamento;
	}

	public Clinica getClinica() {
		return clinica;
	}

	public void setClinica(Clinica clinica) {
		this.clinica = clinica;
	}
	
	

}
